<?php

class ome_finder_reissuedoc
{

	var $column_edit = '操作';
	var $column_edit_width = "50";

    var $detail_reissuedoc_line = "调整明细条件";
	public function column_edit($row)
	{
		$finder_id = $_GET['_finder']['finder_id'];

        $stockappMdl = app::get('ome')->model('reissuedoc');
        $stockapp_datas= $stockappMdl->dump($row['id'],'status');
        if($stockapp_datas['status']=='unconfirmed')
        {
           return '<a target="dialog::{width:700,height:400,title:\'编辑订单号:'.$row['rd_bn'].'\'}" href="index.php?app=ome&ctl=admin_reissuedoc&act=edit&p[0]='.$row['id'].'&finder_id='.$_GET['_finder']['finder_id'].'">编辑</a>  ';
        }else
        {
            return '';
        }
	}

    function detail_reissuedoc_line($row){
        $render = app::get('ome')->render();
        $sql="SELECT * from sdb_ome_reissuedoc_line where reissuedoc_id=".$row;
        
        $db=kernel::database();
        $basicMaterialInfo=$db->select($sql);   
        $render->pagedata['res'] = $basicMaterialInfo;
        return $render->fetch('admin/reissuedoc/reissue_line.html');
    }
}